package com.szf.system.web;

import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;

import com.szf.base.bean.SinlogConstants;
import com.szf.base.web.BaseActionSupport;

@Namespace("/")
@Results({ @Result(name = "success", location = "/login.jsp") })
public class LogoutAction extends BaseActionSupport {
	@Override
	public String execute() {
		request.getSession().removeAttribute(SinlogConstants.PRINCIPLE_KEY);
		request.getSession().invalidate();
		return super.execute();
	}
}
